# Maintainer: Giancarlo Razzolini <grazzolini@archlinux.org>
# Maintainer: Morten Linderud <foxboron@archlinux.org>
# Contibutor: Giovanni Scafora <giovanni@archlinux.org>
# Contributor:  Pawel "kTT" Salata <rockplayer.pl@gmail.com>

pkgname=python-pycountry
pkgver=22.3.5
pkgrel=2
pkgdesc="ISO country, subdivision, language, currency and script definitions and their translations"
arch=('any')
url="https://pypi.org/project/pycountry/"
license=('LGPL2.1')
depends=(python python-lxml)
makedepends=('python' 'python-setuptools')
checkdepends=('python-pytest' 'python-pytest-runner')
source=("https://pypi.io/packages/source/p/pycountry/pycountry-${pkgver}.tar.gz")
sha512sums=('07dc507ee94f1880727761df197f81704386d9246163c9a5872f47083d37c7d1205dfbd28c6663ef0731a0b05277ade03a1a1929ab84087e0e85c05028c68b89')

build(){
  cd "pycountry-${pkgver}"
  python setup.py build
}

check(){
  cd "pycountry-${pkgver}"
  python setup.py pytest
}

package() {
  cd "pycountry-${pkgver}"
  python setup.py install --root="$pkgdir/" --optimize=1 --skip-build
}
